package com.youbug.kefu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author apu
 * @since 2022-12-08
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="Menu对象", description="菜单表")
public class Menu extends BaseEntity {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "菜单编码")
    private String viewName;

    @ApiModelProperty(value = "父节点")
    private Long parentId;

    @ApiModelProperty(value = "节点类型，1文件夹，2页面，3按钮")
    private Integer nodeType;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "排序号")
    private Integer sort;

    @ApiModelProperty(value = "层次")
    private Integer level;

    @ApiModelProperty(value = "页面对应的地址")
    private String path;

    @ApiModelProperty(value = "是否删除 1：已删除；0：未删除")
    private Integer isDelete;

    @ApiModelProperty(value = "树id的路径 整个层次上的路径id，逗号分隔，想要找父节点特别快")
    private String parentFullId;

    @TableField(exist = false)
    private List<Menu> children;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getViewName() {
        return viewName;
    }

    public void setViewName(String viewName) {
        this.viewName = viewName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getNodeType() {
        return nodeType;
    }

    public void setNodeType(Integer nodeType) {
        this.nodeType = nodeType;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    public String getParentFullId() {
        return parentFullId;
    }

    public void setParentFullId(String parentFullId) {
        this.parentFullId = parentFullId;
    }
}
